<template>
    <div>
        <el-carousel :interval="4000" type="card" height="500px">
    <el-carousel-item v-for="(item,index) in data" :key="index">
        <img :src="item.img" height="100%" width="100%">
        

    </el-carousel-item>
  </el-carousel>
    </div>
</template>
<script setup>
import axios from 'axios';
import { onMounted ,ref} from 'vue';
const data = ref([])
onMounted(()=>{
  axios.get('/public/swiperlist.json').then((res)=>{
    data.value = res.data.swiperlist
  })
})
</script>

<style scoped>
.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 500px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>